package com.yenlien.traceyun.usercenter.entity;

/**
 * Created by LiuSha on 2020/6/9.
 */

import com.yenlien.traceyun.webase.entity.BaseEntity;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Table;
import javax.persistence.Transient;
import java.util.List;

/**
 * 部门
 */
@Entity
@Table(name = "t_department")
public class Department extends BaseEntity {
    @Column(name = "company_id", length = 32)
    private String companyId;
    @Column(name = "parent_id", length = 32)
    private String parentId; //上一级
    @Column(name = "name", unique = true)
    private String name;            //部门名称
    @Transient
    List<DepartmentResource> departmentResources;
    @Transient
    List<Department> children;

    public String getCompanyId() {
        return companyId;
    }

    public void setCompanyId(String companyId) {
        this.companyId = companyId;
    }

    public List<Department> getChildren() {
        return children;
    }

    public void setChildren(List<Department> children) {
        this.children = children;
    }

    public List<DepartmentResource> getDepartmentResources() {
        return departmentResources;
    }

    public void setDepartmentResources(List<DepartmentResource> departmentResources) {
        this.departmentResources = departmentResources;
    }

    public String getParentId() {
        return parentId;
    }

    public void setParentId(String parentId) {
        this.parentId = parentId;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }
}
